﻿namespace WMS6.Web.Analytics
{
    using System;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using WMS6.Web;

    public class DeclarationsInOutDetailRptQuery : BasePage
    {
        protected Button btnSearch;
        protected DropDownList ddlCompanyDeclarationsIDOper;
        protected DropDownList ddlDeclarationsDate;
        protected DropDownList ddlDeclarationsIDOper;
        protected DropDownList ddlOwnerID;
        protected DropDownList ddlSkuID;
        protected HtmlForm F15550;
        protected HtmlInputHidden hdnActionID;
        protected HtmlInputHidden hdncalendarFlag;
        protected HtmlInputHidden hdnDataFormat;
        protected HtmlHead Head1;
        protected HtmlImage img1;
        protected HtmlImage img2;
        protected Label lblCompanyDeclarationsID;
        protected Label lblDeclarationsDate;
        protected Label lblDeclarationsID;
        protected Label lblOwnerID;
        protected Label lblSkuID;
        protected HtmlLink mycss;
        protected Label one1;
        protected TextBox txtCompanyDeclarationsID;
        protected TextBox txtDeclarationsDate;
        protected TextBox txtDeclarationsDate2;
        protected TextBox txtDeclarationsID;
        protected TextBox txtOwnerID;
        protected TextBox txtSkuID;

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            base.Server.Transfer(string.Format("DeclarationsInOutDetailRptList.aspx?action={0}", base.UrlEncode(this.hdnActionID.Value.Trim())), false);
        }

        private void LoadDDl()
        {
            base.InitQueryDDL(this.ddlCompanyDeclarationsIDOper, 0);
            base.InitQueryDDL(this.ddlDeclarationsDate, 1);
            base.InitQueryDDL(this.ddlDeclarationsIDOper, 0);
            base.InitQueryDDL(this.ddlOwnerID, 0);
            base.InitQueryDDL(this.ddlSkuID, 0);
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                base.InitPage(this.Page);
                this.LoadDDl();
            }
        }

        public string CompanyDeclarationsID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtCompanyDeclarationsID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtCompanyDeclarationsID.Text.Trim(), this.ddlCompanyDeclarationsIDOper.SelectedValue);
                }
                return "";
            }
        }

        public string DeclarationsDate
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtDeclarationsDate.Text.Trim()))
                {
                    return base.GetParamsString(this.txtDeclarationsDate.Text.Trim(), this.ddlDeclarationsDate.SelectedValue, this.txtDeclarationsDate2.Text.Trim(), "DeclarationsDate");
                }
                return "";
            }
        }

        public string DeclarationsID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtDeclarationsID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtDeclarationsID.Text.Trim(), this.ddlDeclarationsIDOper.SelectedValue);
                }
                return "";
            }
        }

        public string OwnerID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtOwnerID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtOwnerID.Text.Trim(), this.ddlOwnerID.SelectedValue);
                }
                return "";
            }
        }

        public string SkuID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtSkuID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtSkuID.Text.Trim(), this.ddlSkuID.SelectedValue);
                }
                return "";
            }
        }
    }
}

